import React  from 'react';
import ReactDOM  from 'react-dom'
import { withRouter} from 'react-router-dom';
import {Icon,Flex,WhiteSpace,Tools} from 'weaver-mobile';
const getLabel = Tools.getLabel;

@withRouter
/*
 * @info: 权限组件
 * @Author: lusx
 * @Date: 2019-12-01 11:13:16
 * @Last Modified by: lusx
 * @Last Modified time: 2019-10-18 17:13:24
 */
export default class Right extends React.Component {
  constructor(props) {
    super(props);
    this.state={
      hei: 0
    }
  }
  componentDidMount(){
    const height = ReactDOM.findDOMNode(this.ref).parentNode.parentNode.parentNode.parentNode.parentNode.clientHeight;
    this.setState({
      hei:height
    })
  }
  render() {
    const {hei} = this.state;
    return(
      <div className="g-right" ref={ref => this.ref = ref} >
        <Flex justify='center' align='center' direction='column' style={{height:`${hei}px`}}>
            <Icon type='sirenzu' size='lg' color='#868686'/>
            <WhiteSpace size="lg" />
            <div className='g-right-text'>{getLabel("160", "对不起，您暂时没有权限")}</div>
        </Flex>
      </div>
    );
  }
}
